package com.lagou.mr.sort;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

public class SortReducer extends Reducer<SpeakBeanSort, NullWritable,NullWritable,SpeakBeanSort> {
    @Override
    protected void reduce(SpeakBeanSort key, Iterable<NullWritable> values, Reducer<SpeakBeanSort, NullWritable, NullWritable, SpeakBeanSort>.Context context) throws IOException, InterruptedException {
        for(NullWritable v : values){
            context.write(NullWritable.get(),key);
        }
    }
}
